﻿#include <memory>
#include <iostream>
#include <spdlog/spdlog.h>

std::string GetExeDir();
std::shared_ptr<spdlog::logger> CreateFileLoggerWithTimestamp();
extern std::shared_ptr<spdlog::logger> logger;
#define LOG_WARN(...) logger->log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, spdlog::level::warn, __VA_ARGS__)
#define LOG_INFO(...) logger->log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, spdlog::level::info, __VA_ARGS__)
#define LOG_ERROR(...) logger->log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, spdlog::level::err, __VA_ARGS__)
#define LOG_DEBUG(...) logger->log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, spdlog::level::debug, __VA_ARGS__)
#define LOG_CRITICAL(...) logger->log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, spdlog::level::critical, __VA_ARGS__)